package WinterFlower;

/**
 * @author ZJM
 * @version 1.0
 * @since 2022-07-14 19:04:23
 */
public class Beauty implements Cloneable {
    private String beautyName;
    private Cat cat;

    public Beauty() {
    }

    public Beauty(String beautyName, Cat cat) {
        this.beautyName = beautyName;
        this.cat = cat;
    }

    public String getBeautyName() {
        return beautyName;
    }

    public void setBeautyName(String beautyName) {
        this.beautyName = beautyName;
    }

    public Cat getCat() {
        return cat;
    }

    public void setCat(Cat cat) {
        this.cat = cat;
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Cat cat = new Cat("Tomcat");
        Beauty beauty = new Beauty("张三",cat);

        Beauty clone = (Beauty) beauty.clone();

        System.out.println(beauty == clone);//F
        System.out.println(beauty.getCat() == clone.getCat());//t
    }
}
